<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.1;netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
    <EnableDefaultItems>true</EnableDefaultItems>
    <IsPackable>true</IsPackable>
    <PackageDescription>.NET hosting infrastructure for Windows Services.</PackageDescription>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.CloseHandle.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.CloseHandle.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.CreateToolhelp32Snapshot.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.CreateToolhelp32Snapshot.cs" />
    <Compile Include="$(CommonPath)Interop\Windows\Kernel32\Interop.MAX_PATH.cs"
             Link="Common\Interop\Windows\Kernel32\Interop.MAX_PATH.cs" />
    <Compile Include="$(CommonPath)System\ThrowHelper.cs"
             Link="Common\System\ThrowHelper.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
             Link="Common\DisableRuntimeMarshalling.cs" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Hosting\src\Microsoft.Extensions.Hosting.csproj" />
    <ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.EventLog\src\Microsoft.Extensions.Logging.EventLog.csproj" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETFramework'">
    <ProjectReference Include="$(LibrariesProjectRoot)System.ServiceProcess.ServiceController\src\System.ServiceProcess.ServiceController.csproj" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
    <Reference Include="System.ServiceProcess" />
  </ItemGroup>

</Project>
